<template>
	<view class="page index">
		<view class="form">
			<common-input
			  title="关联客户" 
				placeholder="请选择" 
				v-model="customer"
				:disabled="true"
				:border-bottom="false"
				:require="false"
			>
			</common-input>
			<common-input
			  title="关联合同" 
				placeholder="请选择" 
				v-model="agreement"
				:disabled="true"
				:border-bottom="false"
				:require="false"
			>
			</common-input>
			<common-input
			  title="开票单位名称" 
				placeholder="请选择开票单位" 
				v-model="title"
				:disabled="true"
				:select="true"
				:border-bottom="false"
				:require="false"
			>
			</common-input>
			<common-input
			  title="纳税人识别码" 
				placeholder="请填写开票税号" 
				v-model="code"
				:border-bottom="false"
			>
			</common-input>
			<common-input
			  title="地址" 
				placeholder="请填写开票单位地址" 
				v-model="address"
				:border-bottom="false"
				:require="false"
			>
			</common-input>
			<common-input
			  title="电话" 
				placeholder="请填写开票单位电话" 
				v-model="phone"
				:border-bottom="false"
				:require="false"
				:type="tel"
			>
			</common-input>
			<common-input
			  title="开户行" 
				placeholder="请填写开户行" 
				v-model="bank"
				:require="false"
				:border-bottom="false"
			>
			</common-input>
			<common-input
			  title="账号" 
				placeholder="请填写银行账号" 
				v-model="account"
				:require="false"
				:border-bottom="false"
			>
			</common-input>
			<common-input
			  title="开票内容" 
				placeholder="请填写开票内容" 
				v-model="content"
				:border-bottom="false"
			>
			</common-input>
			<common-input
			  title="开票备注" 
				placeholder="请填写开票备注" 
				v-model="remark"
				:require="false"
				:border-bottom="false"
			>
			</common-input>
			<picker mode="selector" :value="typeIndex" :range="typeList" @change="changeType">
				<view class="picker">
					<common-input
					  title="发票类型" 
						placeholder="请选择发票类型" 
						v-model="typeIndex < 0 ? '' : typeList[typeIndex]"
						:disabled="true"
						:select="true"
						:border-bottom="false"
						:require="false"
					>
					</common-input>
				</view>
			</picker>
		</view>
		<view class="footer">
			<button class="cancel">保存为草稿</button>
			<button class="confire">提交审批</button>
		</view>
	</view>
</template>

<script>
	import commonInput from "@/components/commonInput.vue";
	import updateFile from "@/components/updateFile.vue"
	export default{
		data() {
			return{
				customer:'',
				agreement: '',
				title:'',
				code:'',
				address:'',
				phone:'',
				bank:'',
				account:'',
				content:'',
				remark:'',
				typeIndex:-1,
				typeList:['增值税专用发票', '增值税普通发票'],
			}
		},
		components: {
			commonInput,
			updateFile
		},
		methods:{
			changeType(){
				
			},
			updatefiles(e){
				console.log(e,'===============')
			},
			save(){
				
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "@/common/style/customicons.scss";
	.index{
		padding: 24rpx 0;
		@include flex-c;
		.form{
			flex: 1 0 0;
			overflow: auto;
			.text{
				border-bottom: 4rpx #e5e5e5 solid;
				padding: 12rpx 30rpx;
				.title{
					font-size: 28rpx;
					color: #101010;
					padding: 0 0 16rpx;
					display: flex;
					align-items: center;
					.require{
					  height: 28rpx;
					  width: 6rpx;
					  background-color: #c24135;
					  margin-left: 10rpx;
				  }
				}
				textarea{
					font-size: 28rpx;
					color: #909090;
					height: 125rpx;
				}
				.place{
					font-size: 28rpx;
					color: #909090;
				}
			}
			&::-webkit-scrollbar{
				display: none;
			}
		}
		.footer{
			flex: 0 0 auto;
			padding: 24rpx 30rpx;
			@include flex-r-between-start;
			button{
				@include button;
				color: #fff;
				height: 60rpx;
				width: 45%;
				line-height: 60rpx;
				font-size: 28rpx;
			}
			.cancel{
				background-color: #bebebe;
			}
			.confire{
				background-color: #198AFA;
			}
		}
	}
</style>